package com.imddysc.springbootbatch001.utils;

import org.springframework.core.env.Environment;

public class ConfigUtils {
	// 从上下文中获取环境信息
	private static Environment environment = SpringContextUtils.getApplicationContext().getEnvironment();

	/**
	 * 根据key获取配置信息
	 * 
	 * @param key
	 * @return
	 */
	public static String getProperties(String key) {
		return environment.getProperty(key);
	}

}
